from django.core.mail import send_mail

from celery_tasks.main import celery_app


@celery_app.task(name='send_email_active')
def send_email_active(email_addr,message):
    print("异步邮件1")
    subject = '美多购物邮箱激活'
    message = message
    from_email = '美多官方<1161401654@qq.com>'
    recipient_list = [email_addr, '1161401654@qq.com', '2336657109@qq.com']

    send_mail(subject=subject,message='',from_email=from_email,recipient_list=recipient_list,html_message=message)

    print('异步邮件2')